package com.wiscamp.ninechapters.panels.application.assemblers;


import com.wiscamp.ninechapters.panels.application.command.CreateDictionaryCommand;
import com.wiscamp.ninechapters.panels.application.command.UpdateDictionaryCommand;
import com.wiscamp.ninechapters.panels.application.vo.DictionaryVO;
import com.wiscamp.ninechapters.panels.application.vo.SimpleDictionaryVO;
import com.wiscamp.ninechapters.panels.domain.entities.Dictionary;
import org.mapstruct.*;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring",
        unmappedTargetPolicy = ReportingPolicy.IGNORE,
        unmappedSourcePolicy = ReportingPolicy.IGNORE,
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
        nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface DictionaryAssembler {
    DictionaryAssembler Instance = Mappers.getMapper(DictionaryAssembler.class);

    DictionaryVO toDictionaryVO(Dictionary entity);

    SimpleDictionaryVO toSimpleDictionaryVO(Dictionary entity);

    Dictionary fromCreateCommand(CreateDictionaryCommand createCommand);

    Dictionary fromUpdateCommand(UpdateDictionaryCommand updateCommand);

}
